<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDA_TYPE_NULL: GNOME Data Access 5 manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNOME Data Access 5 manual">
<link rel="up" href="migration-3.html" title="Migration from 4.X versions">
<link rel="prev" href="migration-3.html" title="Migration from 4.X versions">
<link rel="next" href="provider-notes.html" title="Provider's notes">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="migration-3.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="migration-3.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="provider-notes.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id-1.2.10.3"></a>GDA_TYPE_NULL</h2></div></div></div>
<p>
      Previous versions of <span class="application">Libgda</span> represented SQL NULL values as a <a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue-struct">GValue</a> completely filled
      with zeros (i.e. of type G_TYPE_INVALID), and GDA_TYPE_NULL was thus equivalent to G_TYPE_INVALID.
    </p>
<p>
      This new version introduces a new specific type for the same GDA_TYPE_NULL (which means
      GDA_TYPE_NULL no longer equals G_TYPE_INVALID). The most common sources of errors brought by this
      change are:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>if you used <a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#g-value-init">g_value_init()</a> on a
	value of type GDA_TYPE_NULL, then you'll have to eight clear the value first, or replace
	that call with a call to <a class="link" href="libgda-5.0-Gda-Value.html#gda-value-reset-with-type" title="gda_value_reset_with_type ()">gda_value_reset_with_type()</a></p></li>
<li class="listitem"><p>the <a class="link" href="libgda-5.0-Utility-functions.html#gda-g-type-from-string" title="gda_g_type_from_string ()">gda_g_type_from_string()</a> function
	now returns G_TYPE_INVALID if it does not know how to interpret the argument, so testing the return
	value now also involves testing for the G_TYPE_INVALID value.</p></li>
<li class="listitem"><p>creating a GValue using <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-new0">g_new0()</a> resulted
	in a GDA_TYPE_NULL value, which is not longer the case; the value needs to be initialized
	with a call to <a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#g-value-init">g_value_init()</a></p></li>
<li class="listitem"><p>testing for NULL values using G_IS_VALUE does not work anymore, you'll have to
	replace them with <a class="link" href="libgda-5.0-Gda-Value.html#GDA-VALUE-HOLDS-NULL:CAPS" title="GDA_VALUE_HOLDS_NULL()">GDA_VALUE_HOLDS_NULL()</a></p></li>
</ul></div>
<p>
    </p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>